using System;
using System.ComponentModel.DataAnnotations;

namespace Work.Domain
{
    /// <summary>
    /// 病历信息
    /// </summary>
    public class MedicalRecord
    {
        /// <summary>
        /// 病历编号
        /// </summary>
        [Key]
        public int RecordId { get; set; }

        /// <summary>
        /// 预约编号（外键）
        /// </summary>
        public int AppointmentId { get; set; }

        /// <summary>
        /// 就诊人编号（外键）
        /// </summary>
        public int PatientId { get; set; }

        /// <summary>
        /// 卡号（冗余，便于查询）
        /// </summary>
        public string? CardNumber { get; set; }

        /// <summary>
        /// 患者姓名（冗余）
        /// </summary>
        public string? PatientName { get; set; }

        /// <summary>
        /// 医生姓名
        /// </summary>
        public string? DoctorName { get; set; }

        /// <summary>
        /// 科室
        /// </summary>
        public string? Department { get; set; }

        /// <summary>
        /// 主诉（患者主要症状）
        /// </summary>
        public string? ChiefComplaint { get; set; }

        /// <summary>
        /// 现病史
        /// </summary>
        public string? PresentIllness { get; set; }

        /// <summary>
        /// 既往史
        /// </summary>
        public string? PastHistory { get; set; }

        /// <summary>
        /// 诊断结果
        /// </summary>
        public string? Diagnosis { get; set; }

        /// <summary>
        /// 治疗方案
        /// </summary>
        public string? Treatment { get; set; }

        /// <summary>
        /// 处方（药品清单）
        /// </summary>
        public string? Prescription { get; set; }

        /// <summary>
        /// 医嘱（注意事项）
        /// </summary>
        public string? Advice { get; set; }

        /// <summary>
        /// 就诊日期
        /// </summary>
        public DateTime? VisitDate { get; set; }

        /// <summary>
        /// 病历创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 病历最后修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 病历状态（草稿/已完成/已归档）
        /// </summary>
        public string? Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        // 导航属性
        /// <summary>
        /// 关联的预约信息
        /// </summary>
        public virtual Appintment? Appointment { get; set; }

        /// <summary>
        /// 关联的患者信息
        /// </summary>
        public virtual Patient? Patient { get; set; }
    }
}








